//
//  LYEmptyManager.m
//  RILISHAIXUAN
//
//  Created by 刘应平 on 2018/1/16.
//  Copyright © 2018年 刘应平. All rights reserved.
//

#import "LYEmptyManager.h"

@implementation LYEmptyManager
+ (void)showNoDataWithView:(UITableView *)tableView{
    LYEmptyView *view = [LYEmptyView emptyViewWithImageStr:@"list_de" titleStr:@"" detailStr:@""];
    tableView.ly_emptyView = view;
}

+ (void)showLoadFailWithView:(UITableView *)tableView managerBlock:(LYActionTapManagerBlock)managerBlock{
    LYEmptyView *view = [LYEmptyView emptyActionViewWithImageStr:@"list_de" titleStr:@"" detailStr:@"" btnTitleStr:@"重新加载" btnClickBlock:^{
        if (managerBlock) {
            managerBlock();
        }
    }];
    view.actionBtnBackGroundColor = [UIColor themeColor];
    tableView.ly_emptyView = view;
}

+ (void)showLoadFailWithForScrollView:(UIScrollView *)scrollView managerBlock:(LYActionTapManagerBlock)managerBlock{
    LYEmptyView *view = [LYEmptyView emptyActionViewWithImageStr:@"list_de" titleStr:@"" detailStr:@"" btnTitleStr:@"重新加载" btnClickBlock:^{
        if (managerBlock) {
            managerBlock();
        }
    }];
    view.actionBtnBackGroundColor = [UIColor themeColor];
    scrollView.ly_emptyView = view;
}

@end
